<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: coap_session.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('coap__session_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">coap_session.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;coap_config.h&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__io_8h_source.html">coap_io.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__session_8h_source.html">coap_session.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="net_8h_source.html">net.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__debug_8h_source.html">coap_debug.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mem_8h_source.html">mem.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="resource_8h_source.html">resource.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="utlist_8h_source.html">utlist.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="encode_8h_source.html">encode.h</a>&quot;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
</div>
<p><a href="coap__session_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aadbdd7f8114e7932a35bd0718ef65d89" id="r_aadbdd7f8114e7932a35bd0718ef65d89"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#aadbdd7f8114e7932a35bd0718ef65d89">COAP_SESSION_C_</a></td></tr>
<tr class="separator:aadbdd7f8114e7932a35bd0718ef65d89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af776b22a727aae7c9f4d869d50df47e8" id="r_af776b22a727aae7c9f4d869d50df47e8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#af776b22a727aae7c9f4d869d50df47e8">INET6_ADDRSTRLEN</a>&#160;&#160;&#160;40</td></tr>
<tr class="separator:af776b22a727aae7c9f4d869d50df47e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0292e90d1449f26885194c9efb7d3a27" id="r_a0292e90d1449f26885194c9efb7d3a27"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a0292e90d1449f26885194c9efb7d3a27">coap_session_set_max_retransmit</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, unsigned int value)</td></tr>
<tr class="memdesc:a0292e90d1449f26885194c9efb7d3a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP maximum retransmit count before failure.  <br /></td></tr>
<tr class="separator:a0292e90d1449f26885194c9efb7d3a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b9cd625815481afa130fa086362dfe1" id="r_a9b9cd625815481afa130fa086362dfe1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a9b9cd625815481afa130fa086362dfe1">coap_session_set_ack_timeout</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> value)</td></tr>
<tr class="memdesc:a9b9cd625815481afa130fa086362dfe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP initial ack response timeout before the next re-transmit.  <br /></td></tr>
<tr class="separator:a9b9cd625815481afa130fa086362dfe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45feb3b133d2673839723a8ecf6d547c" id="r_a45feb3b133d2673839723a8ecf6d547c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a45feb3b133d2673839723a8ecf6d547c">coap_session_set_ack_random_factor</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> value)</td></tr>
<tr class="memdesc:a45feb3b133d2673839723a8ecf6d547c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the CoAP ack randomize factor.  <br /></td></tr>
<tr class="separator:a45feb3b133d2673839723a8ecf6d547c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495176d2531e846c1cda3961119df1c0" id="r_a495176d2531e846c1cda3961119df1c0"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a495176d2531e846c1cda3961119df1c0">coap_session_get_max_transmit</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a495176d2531e846c1cda3961119df1c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP maximum retransmit before failure.  <br /></td></tr>
<tr class="separator:a495176d2531e846c1cda3961119df1c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b7b3b2cc65d0f9f4affbfa76aaf6dac" id="r_a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a9b7b3b2cc65d0f9f4affbfa76aaf6dac">coap_session_get_ack_timeout</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP initial ack response timeout before the next re-transmit.  <br /></td></tr>
<tr class="separator:a9b7b3b2cc65d0f9f4affbfa76aaf6dac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9d572f48de8c2d3158222102221ddfe" id="r_ae9d572f48de8c2d3158222102221ddfe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ae9d572f48de8c2d3158222102221ddfe">coap_session_get_ack_random_factor</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ae9d572f48de8c2d3158222102221ddfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the CoAP ack randomize factor.  <br /></td></tr>
<tr class="separator:ae9d572f48de8c2d3158222102221ddfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae37bac62f8de2cecd968ec1c26eb23b4" id="r_ae37bac62f8de2cecd968ec1c26eb23b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ae37bac62f8de2cecd968ec1c26eb23b4">coap_session_reference</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ae37bac62f8de2cecd968ec1c26eb23b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment reference counter on a session.  <br /></td></tr>
<tr class="separator:ae37bac62f8de2cecd968ec1c26eb23b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9aee135ba884d7c143b11bc42fd23e53" id="r_a9aee135ba884d7c143b11bc42fd23e53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a9aee135ba884d7c143b11bc42fd23e53">coap_session_release</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a9aee135ba884d7c143b11bc42fd23e53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrement reference counter on a session.  <br /></td></tr>
<tr class="separator:a9aee135ba884d7c143b11bc42fd23e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b7c6c6b74d8c8b7b5b545fd8deea3e4" id="r_a1b7c6c6b74d8c8b7b5b545fd8deea3e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a1b7c6c6b74d8c8b7b5b545fd8deea3e4">coap_session_set_app_data</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, void *app_data)</td></tr>
<tr class="memdesc:a1b7c6c6b74d8c8b7b5b545fd8deea3e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores <code>data</code> with the given session.  <br /></td></tr>
<tr class="separator:a1b7c6c6b74d8c8b7b5b545fd8deea3e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaa81c523bab1519c3df5b06e7931f66" id="r_afaa81c523bab1519c3df5b06e7931f66"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#afaa81c523bab1519c3df5b06e7931f66">coap_session_get_app_data</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:afaa81c523bab1519c3df5b06e7931f66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns any application-specific data that has been stored with <code>session</code> using the function <a class="el" href="coap__session_8h.html#a99e20f56b02256dc352cc48bdc04b778" title="Stores data with the given session.">coap_session_set_app_data()</a>.  <br /></td></tr>
<tr class="separator:afaa81c523bab1519c3df5b06e7931f66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32c42eb2b3841b62df0473accb73bd56" id="r_a32c42eb2b3841b62df0473accb73bd56"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a32c42eb2b3841b62df0473accb73bd56">coap_make_session</a> (<a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, <a class="el" href="coap__session_8h.html#a53c0f7c2c9ea53e2abc29d308337d4a5">coap_session_type_t</a> type, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_addr, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *remote_addr, int ifindex, <a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint)</td></tr>
<tr class="separator:a32c42eb2b3841b62df0473accb73bd56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab91ca670624ee770714727efff274c49" id="r_ab91ca670624ee770714727efff274c49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ab91ca670624ee770714727efff274c49">coap_session_mfree</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:ab91ca670624ee770714727efff274c49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3d24595515d6f66805791a7f821d5e7" id="r_ab3d24595515d6f66805791a7f821d5e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ab3d24595515d6f66805791a7f821d5e7">coap_session_free</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:ab3d24595515d6f66805791a7f821d5e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4368ee622c681bf7cf0b7cfe99c8ab37" id="r_a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a4368ee622c681bf7cf0b7cfe99c8ab37">coap_session_max_pdu_size</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get maximum acceptable PDU size.  <br /></td></tr>
<tr class="separator:a4368ee622c681bf7cf0b7cfe99c8ab37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23671937b7c384fb768ccd00cc39db45" id="r_a23671937b7c384fb768ccd00cc39db45"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a23671937b7c384fb768ccd00cc39db45">coap_session_set_mtu</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, unsigned mtu)</td></tr>
<tr class="memdesc:a23671937b7c384fb768ccd00cc39db45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the session MTU.  <br /></td></tr>
<tr class="separator:a23671937b7c384fb768ccd00cc39db45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43ad12697cacde3be9579f8253ca9ccf" id="r_a43ad12697cacde3be9579f8253ca9ccf"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a43ad12697cacde3be9579f8253ca9ccf">coap_session_send</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t datalen)</td></tr>
<tr class="memdesc:a43ad12697cacde3be9579f8253ca9ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function interface for datagram data transmission.  <br /></td></tr>
<tr class="separator:a43ad12697cacde3be9579f8253ca9ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb19e1f2544b8b01424fa2e9dce41e7b" id="r_adb19e1f2544b8b01424fa2e9dce41e7b"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#adb19e1f2544b8b01424fa2e9dce41e7b">coap_session_write</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, size_t datalen)</td></tr>
<tr class="memdesc:adb19e1f2544b8b01424fa2e9dce41e7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function interface for stream data transmission.  <br /></td></tr>
<tr class="separator:adb19e1f2544b8b01424fa2e9dce41e7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a192c2ce0f620200797ee34ac6f5d04c7" id="r_a192c2ce0f620200797ee34ac6f5d04c7"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a192c2ce0f620200797ee34ac6f5d04c7">coap_session_delay_pdu</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <a class="el" href="structcoap__queue__t.html">coap_queue_t</a> *node)</td></tr>
<tr class="separator:a192c2ce0f620200797ee34ac6f5d04c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f455ec1572982a5ae404beac0cfbd53" id="r_a2f455ec1572982a5ae404beac0cfbd53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a2f455ec1572982a5ae404beac0cfbd53">coap_session_send_csm</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:a2f455ec1572982a5ae404beac0cfbd53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session transport has just connected and CSM exchange can now start.  <br /></td></tr>
<tr class="separator:a2f455ec1572982a5ae404beac0cfbd53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3f9f60c0a4857c147fef5721025944c" id="r_ab3f9f60c0a4857c147fef5721025944c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ab3f9f60c0a4857c147fef5721025944c">coap_session_send_ping</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:ab3f9f60c0a4857c147fef5721025944c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a ping message for the session.  <br /></td></tr>
<tr class="separator:ab3f9f60c0a4857c147fef5721025944c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8b3a2da8480911b0216dad076038cb6" id="r_aa8b3a2da8480911b0216dad076038cb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#aa8b3a2da8480911b0216dad076038cb6">coap_session_connected</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:aa8b3a2da8480911b0216dad076038cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session that it has just connected or reconnected.  <br /></td></tr>
<tr class="separator:aa8b3a2da8480911b0216dad076038cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3377d3198c10fa086502035ded9c268" id="r_ad3377d3198c10fa086502035ded9c268"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ad3377d3198c10fa086502035ded9c268">coap_session_disconnected</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session, <a class="el" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a> reason)</td></tr>
<tr class="memdesc:ad3377d3198c10fa086502035ded9c268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify session that it has failed.  <br /></td></tr>
<tr class="separator:ad3377d3198c10fa086502035ded9c268"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a444db8938d615f02af128c7e65d34678" id="r_a444db8938d615f02af128c7e65d34678"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a444db8938d615f02af128c7e65d34678">coap_endpoint_get_session</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint, const <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *packet, <a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a> now)</td></tr>
<tr class="separator:a444db8938d615f02af128c7e65d34678"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dd08f1716885e31619c7890f06e9fdd" id="r_a2dd08f1716885e31619c7890f06e9fdd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a2dd08f1716885e31619c7890f06e9fdd">coap_endpoint_new_dtls_session</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint, const <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *packet, <a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a> now)</td></tr>
<tr class="separator:a2dd08f1716885e31619c7890f06e9fdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaa3104f2f2bf0283a4274668b9e7f90" id="r_adaa3104f2f2bf0283a4274668b9e7f90"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#adaa3104f2f2bf0283a4274668b9e7f90">coap_session_create_client</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="separator:adaa3104f2f2bf0283a4274668b9e7f90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fb1870440f69c577f44044d18dad5ae" id="r_a6fb1870440f69c577f44044d18dad5ae"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a6fb1870440f69c577f44044d18dad5ae">coap_session_connect</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:a6fb1870440f69c577f44044d18dad5ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3228a12e10ff1a77cd41ccb7f43951ab" id="r_a3228a12e10ff1a77cd41ccb7f43951ab"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a3228a12e10ff1a77cd41ccb7f43951ab">coap_session_accept</a> (<a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="separator:a3228a12e10ff1a77cd41ccb7f43951ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27368ba92c60da1c501408477b86735e" id="r_a27368ba92c60da1c501408477b86735e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a27368ba92c60da1c501408477b86735e">coap_new_client_session</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:a27368ba92c60da1c501408477b86735e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server.  <br /></td></tr>
<tr class="separator:a27368ba92c60da1c501408477b86735e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaad2073b08052ead81502b708d1c3df3" id="r_aaad2073b08052ead81502b708d1c3df3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#aaad2073b08052ead81502b708d1c3df3">coap_new_client_session_psk</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, const char *identity, const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *key, unsigned key_len)</td></tr>
<tr class="memdesc:aaad2073b08052ead81502b708d1c3df3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server with PSK credentials.  <br /></td></tr>
<tr class="separator:aaad2073b08052ead81502b708d1c3df3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3e76db58be0cf8c765b61eaa21f53f0" id="r_ab3e76db58be0cf8c765b61eaa21f53f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#ab3e76db58be0cf8c765b61eaa21f53f0">coap_new_client_session_pki</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *local_if, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *server, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto, <a class="el" href="structcoap__dtls__pki__t.html">coap_dtls_pki_t</a> *setup_data)</td></tr>
<tr class="memdesc:ab3e76db58be0cf8c765b61eaa21f53f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client session to the designated server with PKI credentials.  <br /></td></tr>
<tr class="separator:ab3e76db58be0cf8c765b61eaa21f53f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafc6eaf74d9d37986133b2c9ffdb4991" id="r_aafc6eaf74d9d37986133b2c9ffdb4991"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#aafc6eaf74d9d37986133b2c9ffdb4991">coap_new_server_session</a> (struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep)</td></tr>
<tr class="memdesc:aafc6eaf74d9d37986133b2c9ffdb4991"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new server session for the specified endpoint.  <br /></td></tr>
<tr class="separator:aafc6eaf74d9d37986133b2c9ffdb4991"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66470a0f926a4e96872e830ce793755c" id="r_a66470a0f926a4e96872e830ce793755c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a66470a0f926a4e96872e830ce793755c">coap_new_endpoint</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *context, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *listen_addr, <a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto)</td></tr>
<tr class="memdesc:a66470a0f926a4e96872e830ce793755c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new endpoint for communicating with peers.  <br /></td></tr>
<tr class="separator:a66470a0f926a4e96872e830ce793755c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a931e94b3cc6971b37c9fcff13aaf502f" id="r_a931e94b3cc6971b37c9fcff13aaf502f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a931e94b3cc6971b37c9fcff13aaf502f">coap_endpoint_set_default_mtu</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep, unsigned mtu)</td></tr>
<tr class="memdesc:a931e94b3cc6971b37c9fcff13aaf502f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the endpoint's default MTU.  <br /></td></tr>
<tr class="separator:a931e94b3cc6971b37c9fcff13aaf502f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a157d58fe7840d7d7e36c40fff0825674" id="r_a157d58fe7840d7d7e36c40fff0825674"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#a157d58fe7840d7d7e36c40fff0825674">coap_free_endpoint</a> (<a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *ep)</td></tr>
<tr class="separator:a157d58fe7840d7d7e36c40fff0825674"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acee24426600d6f3e9f655dc413ed8c99" id="r_acee24426600d6f3e9f655dc413ed8c99"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="coap__session_8c.html#acee24426600d6f3e9f655dc413ed8c99">coap_session_get_by_peer</a> (<a class="el" href="structcoap__context__t.html">coap_context_t</a> *ctx, const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *remote_addr, int ifindex)</td></tr>
<tr class="separator:acee24426600d6f3e9f655dc413ed8c99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf09c67f27059ca278900e7e8fdd475e" id="r_gabf09c67f27059ca278900e7e8fdd475e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__logging.html#gabf09c67f27059ca278900e7e8fdd475e">coap_session_str</a> (const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *session)</td></tr>
<tr class="memdesc:gabf09c67f27059ca278900e7e8fdd475e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get session description.  <br /></td></tr>
<tr class="separator:gabf09c67f27059ca278900e7e8fdd475e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab3c752e5438040817ca0df50ceaf162" id="r_gaab3c752e5438040817ca0df50ceaf162"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__logging.html#gaab3c752e5438040817ca0df50ceaf162">coap_endpoint_str</a> (const <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *endpoint)</td></tr>
<tr class="memdesc:gaab3c752e5438040817ca0df50ceaf162"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get endpoint description.  <br /></td></tr>
<tr class="separator:gaab3c752e5438040817ca0df50ceaf162"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aadbdd7f8114e7932a35bd0718ef65d89" name="aadbdd7f8114e7932a35bd0718ef65d89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbdd7f8114e7932a35bd0718ef65d89">&#9670;&#160;</a></span>COAP_SESSION_C_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COAP_SESSION_C_</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00010">10</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="af776b22a727aae7c9f4d869d50df47e8" name="af776b22a727aae7c9f4d869d50df47e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af776b22a727aae7c9f4d869d50df47e8">&#9670;&#160;</a></span>INET6_ADDRSTRLEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define INET6_ADDRSTRLEN&#160;&#160;&#160;40</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a444db8938d615f02af128c7e65d34678" name="a444db8938d615f02af128c7e65d34678"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a444db8938d615f02af128c7e65d34678">&#9670;&#160;</a></span>coap_endpoint_get_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_endpoint_get_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00447">447</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a2dd08f1716885e31619c7890f06e9fdd" name="a2dd08f1716885e31619c7890f06e9fdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dd08f1716885e31619c7890f06e9fdd">&#9670;&#160;</a></span>coap_endpoint_new_dtls_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_endpoint_new_dtls_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__packet__t.html">coap_packet_t</a> *&#160;</td>
          <td class="paramname"><em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__clock.html#ga97ff1502e211b4ee6c3f15a598833438">coap_tick_t</a>&#160;</td>
          <td class="paramname"><em>now</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00527">527</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a931e94b3cc6971b37c9fcff13aaf502f" name="a931e94b3cc6971b37c9fcff13aaf502f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a931e94b3cc6971b37c9fcff13aaf502f">&#9670;&#160;</a></span>coap_endpoint_set_default_mtu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_endpoint_set_default_mtu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>mtu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the endpoint's default MTU. </p>
<p>This is the maximum message size that can be sent, excluding IP and UDP overhead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">endpoint</td><td>The CoAP endpoint. </td></tr>
    <tr><td class="paramname">mtu</td><td>maximum message size </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00896">896</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a157d58fe7840d7d7e36c40fff0825674" name="a157d58fe7840d7d7e36c40fff0825674"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a157d58fe7840d7d7e36c40fff0825674">&#9670;&#160;</a></span>coap_free_endpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_free_endpoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>ep</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00901">901</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a32c42eb2b3841b62df0473accb73bd56" name="a32c42eb2b3841b62df0473accb73bd56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32c42eb2b3841b62df0473accb73bd56">&#9670;&#160;</a></span>coap_make_session()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_make_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="coap__session_8h.html#a53c0f7c2c9ea53e2abc29d308337d4a5">coap_session_type_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>remote_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ifindex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>endpoint</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00100">100</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a27368ba92c60da1c501408477b86735e" name="a27368ba92c60da1c501408477b86735e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27368ba92c60da1c501408477b86735e">&#9670;&#160;</a></span>coap_new_client_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00665">665</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab3e76db58be0cf8c765b61eaa21f53f0" name="ab3e76db58be0cf8c765b61eaa21f53f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3e76db58be0cf8c765b61eaa21f53f0">&#9670;&#160;</a></span>coap_new_client_session_pki()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session_pki </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcoap__dtls__pki__t.html">coap_dtls_pki_t</a> *&#160;</td>
          <td class="paramname"><em>setup_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server with PKI credentials. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>CoAP Protocol. </td></tr>
    <tr><td class="paramname">setup_data</td><td>PKI parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call <a class="el" href="coap__session_8h.html#a9aee135ba884d7c143b11bc42fd23e53" title="Decrement reference counter on a session.">coap_session_release()</a> to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00740">740</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aaad2073b08052ead81502b708d1c3df3" name="aaad2073b08052ead81502b708d1c3df3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaad2073b08052ead81502b708d1c3df3">&#9670;&#160;</a></span>coap_new_client_session_psk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_client_session_psk </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>key_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new client session to the designated server with PSK credentials. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">local_if</td><td>Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. </td></tr>
    <tr><td class="paramname">server</td><td>The server's address. If the port number is zero, the default port for the protocol will be used. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol. </td></tr>
    <tr><td class="paramname">identity</td><td>PSK client identity </td></tr>
    <tr><td class="paramname">key</td><td>PSK shared key </td></tr>
    <tr><td class="paramname">key_len</td><td>PSK shared key length</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00680">680</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a66470a0f926a4e96872e830ce793755c" name="a66470a0f926a4e96872e830ce793755c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66470a0f926a4e96872e830ce793755c">&#9670;&#160;</a></span>coap_new_endpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> * coap_new_endpoint </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>listen_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new endpoint for communicating with peers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>The coap context that will own the new endpoint </td></tr>
    <tr><td class="paramname">listen_addr</td><td>Address the endpoint will listen for incoming requests on or originate outgoing requests from. Use NULL to specify that no incoming request will be accepted and use a random endpoint. </td></tr>
    <tr><td class="paramname">proto</td><td>Protocol used on this endpoint </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00810">810</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aafc6eaf74d9d37986133b2c9ffdb4991" name="aafc6eaf74d9d37986133b2c9ffdb4991"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafc6eaf74d9d37986133b2c9ffdb4991">&#9670;&#160;</a></span>coap_new_server_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_new_server_session </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structcoap__endpoint__t.html">coap_endpoint_t</a> *&#160;</td>
          <td class="paramname"><em>ep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new server session for the specified endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ctx</td><td>The CoAP context. </td></tr>
    <tr><td class="paramname">ep</td><td>An endpoint where an incoming connection request is pending.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new CoAP session or NULL if failed. Call coap_session_release to free. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00780">780</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a3228a12e10ff1a77cd41ccb7f43951ab" name="a3228a12e10ff1a77cd41ccb7f43951ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3228a12e10ff1a77cd41ccb7f43951ab">&#9670;&#160;</a></span>coap_session_accept()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_accept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00638">638</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a6fb1870440f69c577f44044d18dad5ae" name="a6fb1870440f69c577f44044d18dad5ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fb1870440f69c577f44044d18dad5ae">&#9670;&#160;</a></span>coap_session_connect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_connect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00594">594</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="aa8b3a2da8480911b0216dad076038cb6" name="aa8b3a2da8480911b0216dad076038cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8b3a2da8480911b0216dad076038cb6">&#9670;&#160;</a></span>coap_session_connected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_connected </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session that it has just connected or reconnected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00326">326</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="adaa3104f2f2bf0283a4274668b9e7f90" name="adaa3104f2f2bf0283a4274668b9e7f90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaa3104f2f2bf0283a4274668b9e7f90">&#9670;&#160;</a></span>coap_session_create_client()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_create_client </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>local_if</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>&#160;</td>
          <td class="paramname"><em>proto</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00550">550</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a192c2ce0f620200797ee34ac6f5d04c7" name="a192c2ce0f620200797ee34ac6f5d04c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a192c2ce0f620200797ee34ac6f5d04c7">&#9670;&#160;</a></span>coap_session_delay_pdu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_delay_pdu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>pdu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__queue__t.html">coap_queue_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00253">253</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ad3377d3198c10fa086502035ded9c268" name="ad3377d3198c10fa086502035ded9c268"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3377d3198c10fa086502035ded9c268">&#9670;&#160;</a></span>coap_session_disconnected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_disconnected </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="coap__io_8h.html#a7ff2bb32137ca684be5539c156bdc418">coap_nack_reason_t</a>&#160;</td>
          <td class="paramname"><em>reason</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session that it has failed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">reason</td><td>The reason why the session was disconnected. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00383">383</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab3d24595515d6f66805791a7f821d5e7" name="ab3d24595515d6f66805791a7f821d5e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3d24595515d6f66805791a7f821d5e7">&#9670;&#160;</a></span>coap_session_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00170">170</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ae9d572f48de8c2d3158222102221ddfe" name="ae9d572f48de8c2d3158222102221ddfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9d572f48de8c2d3158222102221ddfe">&#9670;&#160;</a></span>coap_session_get_ack_random_factor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> coap_session_get_ack_random_factor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP ack randomize factor. </p>
<p>A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current ack randomize value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00066">66</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9b7b3b2cc65d0f9f4affbfa76aaf6dac" name="a9b7b3b2cc65d0f9f4affbfa76aaf6dac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b7b3b2cc65d0f9f4affbfa76aaf6dac">&#9670;&#160;</a></span>coap_session_get_ack_timeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a> coap_session_get_ack_timeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP initial ack response timeout before the next re-transmit. </p>
<p>Number of seconds when to expect an ACK or a response to an outstanding CON message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current ack response timeout value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00061">61</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="afaa81c523bab1519c3df5b06e7931f66" name="afaa81c523bab1519c3df5b06e7931f66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaa81c523bab1519c3df5b06e7931f66">&#9670;&#160;</a></span>coap_session_get_app_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * coap_session_get_app_data </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns any application-specific data that has been stored with <code>session</code> using the function <a class="el" href="coap__session_8h.html#a99e20f56b02256dc352cc48bdc04b778" title="Stores data with the given session.">coap_session_set_app_data()</a>. </p>
<p>This function will return <code>NULL</code> if no data has been stored. </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00094">94</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="acee24426600d6f3e9f655dc413ed8c99" name="acee24426600d6f3e9f655dc413ed8c99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acee24426600d6f3e9f655dc413ed8c99">&#9670;&#160;</a></span>coap_session_get_by_peer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_get_by_peer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__context__t.html">coap_context_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structcoap__address__t.html">coap_address_t</a> *&#160;</td>
          <td class="paramname"><em>remote_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ifindex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00923">923</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a495176d2531e846c1cda3961119df1c0" name="a495176d2531e846c1cda3961119df1c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a495176d2531e846c1cda3961119df1c0">&#9670;&#160;</a></span>coap_session_get_max_transmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int coap_session_get_max_transmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the CoAP maximum retransmit before failure. </p>
<p>Number of message retransmissions before message sending is stopped</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current maximum retransmit value </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00056">56</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a4368ee622c681bf7cf0b7cfe99c8ab37" name="a4368ee622c681bf7cf0b7cfe99c8ab37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4368ee622c681bf7cf0b7cfe99c8ab37">&#9670;&#160;</a></span>coap_session_max_pdu_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t coap_session_max_pdu_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get maximum acceptable PDU size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>maximum PDU size, not including header (but including token). </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00189">189</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab91ca670624ee770714727efff274c49" name="ab91ca670624ee770714727efff274c49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab91ca670624ee770714727efff274c49">&#9670;&#160;</a></span>coap_session_mfree()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_mfree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00147">147</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ae37bac62f8de2cecd968ec1c26eb23b4" name="ae37bac62f8de2cecd968ec1c26eb23b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae37bac62f8de2cecd968ec1c26eb23b4">&#9670;&#160;</a></span>coap_session_reference()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__session__t.html">coap_session_t</a> * coap_session_reference </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increment reference counter on a session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>same as session </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00071">71</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9aee135ba884d7c143b11bc42fd23e53" name="a9aee135ba884d7c143b11bc42fd23e53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9aee135ba884d7c143b11bc42fd23e53">&#9670;&#160;</a></span>coap_session_release()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_release </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrement reference counter on a session. </p>
<p>Note that the session may be deleted as a result and should not be used after this call.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00077">77</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a43ad12697cacde3be9579f8253ca9ccf" name="a43ad12697cacde3be9579f8253ca9ccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43ad12697cacde3be9579f8253ca9ccf">&#9670;&#160;</a></span>coap_session_send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_send </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function interface for datagram data transmission. </p>
<p>This function returns the number of bytes that have been transmitted, or a value less than zero on error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send data on. </td></tr>
    <tr><td class="paramname">data</td><td>The data to send. </td></tr>
    <tr><td class="paramname">datalen</td><td>The actual length of <code>data</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written on success, or a value less than zero on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00218">218</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a2f455ec1572982a5ae404beac0cfbd53" name="a2f455ec1572982a5ae404beac0cfbd53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f455ec1572982a5ae404beac0cfbd53">&#9670;&#160;</a></span>coap_session_send_csm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_send_csm </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Notify session transport has just connected and CSM exchange can now start. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00290">290</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="ab3f9f60c0a4857c147fef5721025944c" name="ab3f9f60c0a4857c147fef5721025944c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3f9f60c0a4857c147fef5721025944c">&#9670;&#160;</a></span>coap_session_send_ping()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a> coap_session_send_ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a ping message for the session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>COAP_INVALID_TID if there is an error </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00316">316</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a45feb3b133d2673839723a8ecf6d547c" name="a45feb3b133d2673839723a8ecf6d547c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45feb3b133d2673839723a8ecf6d547c">&#9670;&#160;</a></span>coap_session_set_ack_random_factor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_ack_random_factor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP ack randomize factor. </p>
<p>A factor that is used to randomize the wait time before a message is retransmitted to prevent synchronization effects.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 1.5 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00045">45</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a9b9cd625815481afa130fa086362dfe1" name="a9b9cd625815481afa130fa086362dfe1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b9cd625815481afa130fa086362dfe1">&#9670;&#160;</a></span>coap_session_set_ack_timeout()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_ack_timeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcoap__fixed__point__t.html">coap_fixed_point_t</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP initial ack response timeout before the next re-transmit. </p>
<p>Number of seconds when to expect an ACK or a response to an outstanding CON message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 2 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00035">35</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a1b7c6c6b74d8c8b7b5b545fd8deea3e4" name="a1b7c6c6b74d8c8b7b5b545fd8deea3e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b7c6c6b74d8c8b7b5b545fd8deea3e4">&#9670;&#160;</a></span>coap_session_set_app_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_app_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stores <code>data</code> with the given session. </p>
<p>This function overwrites any value that has previously been stored with <code>session</code>. </p>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00088">88</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a0292e90d1449f26885194c9efb7d3a27" name="a0292e90d1449f26885194c9efb7d3a27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0292e90d1449f26885194c9efb7d3a27">&#9670;&#160;</a></span>coap_session_set_max_retransmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_max_retransmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the CoAP maximum retransmit count before failure. </p>
<p>Number of message retransmissions before message sending is stopped</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">value</td><td>The value to set to. The default is 4 and should not normally get changed. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00026">26</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="a23671937b7c384fb768ccd00cc39db45" name="a23671937b7c384fb768ccd00cc39db45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23671937b7c384fb768ccd00cc39db45">&#9670;&#160;</a></span>coap_session_set_mtu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void coap_session_set_mtu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>mtu</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the session MTU. </p>
<p>This is the maximum message size that can be sent, excluding IP and UDP overhead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>The CoAP session. </td></tr>
    <tr><td class="paramname">mtu</td><td>maximum message size </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00206">206</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
<a id="adb19e1f2544b8b01424fa2e9dce41e7b" name="adb19e1f2544b8b01424fa2e9dce41e7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb19e1f2544b8b01424fa2e9dce41e7b">&#9670;&#160;</a></span>coap_session_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t coap_session_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcoap__session__t.html">coap_session_t</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function interface for stream data transmission. </p>
<p>This function returns the number of bytes that have been transmitted, or a value less than zero on error. The number of bytes written may be less than datalen because of congestion control.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send data on. </td></tr>
    <tr><td class="paramname">data</td><td>The data to send. </td></tr>
    <tr><td class="paramname">datalen</td><td>The actual length of <code>data</code>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written on success, or a value less than zero on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="coap__session_8c_source.html#l00239">239</a> of file <a class="el" href="coap__session_8c_source.html">coap_session.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="coap__session_8c.html">coap_session.c</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
